package com.api.league.form;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.Valid;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.util.Date;
import java.util.List;

/**
 * @author RenQiang
 * @date 2021/5/30
 */
@Data
@ApiModel(value = "批量添加对局表单")
public class BatchAddFixturesForm {
    @NotNull
    @ApiModelProperty(value = "联赛ID")
    private Long leagueId;
    @NotEmpty
    @ApiModelProperty(value = "比赛日列表")
    @Valid
    private List<MatchDayForm> matchDays;

    @Data
    public static class MatchDayForm {
        @NotNull
        @ApiModelProperty(value = "比赛日编号", notes = "前端需保证其按顺序排列")
        private Integer no;
        @NotEmpty
        @ApiModelProperty(value = "比赛日的对局列表")
        @Valid
        private List<FixtureForm> fixtures;
    }
}
